/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Emanuel
 */
@Entity
@Table(name = "cartoes_mb")
@NamedQueries({@NamedQuery(name = "CartoesMb.findAll", query = "SELECT c FROM CartoesMb c"), @NamedQuery(name = "CartoesMb.findByIdCARTOESMB", query = "SELECT c FROM CartoesMb c WHERE c.idCARTOESMB = :idCARTOESMB"), @NamedQuery(name = "CartoesMb.findByPin", query = "SELECT c FROM CartoesMb c WHERE c.pin = :pin"), @NamedQuery(name = "CartoesMb.findByIpin", query = "SELECT c FROM CartoesMb c WHERE c.ipin = :ipin"), @NamedQuery(name = "CartoesMb.findByNib", query = "SELECT c FROM CartoesMb c WHERE c.nib = :nib")})
public class CartoesMb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idCARTOES_MB")
    private Integer idCARTOESMB;
    @Basic(optional = false)
    @Column(name = "PIN")
    private int pin;
    @Basic(optional = false)
    @Column(name = "IPIN")
    private String ipin;
    @Column(name = "NIB")
    private String nib;

    public CartoesMb() {
    }

    public CartoesMb(Integer idCARTOESMB) {
        this.idCARTOESMB = idCARTOESMB;
    }

    public CartoesMb(Integer idCARTOESMB, int pin, String ipin) {
        this.idCARTOESMB = idCARTOESMB;
        this.pin = pin;
        this.ipin = ipin;
    }

    public Integer getIdCARTOESMB() {
        return idCARTOESMB;
    }

    public void setIdCARTOESMB(Integer idCARTOESMB) {
        this.idCARTOESMB = idCARTOESMB;
    }

    public int getPin() {
        return pin;
    }

    public void setPin(int pin) {
        this.pin = pin;
    }

    public String getIpin() {
        return ipin;
    }

    public void setIpin(String ipin) {
        this.ipin = ipin;
    }

    public String getNib() {
        return nib;
    }

    public void setNib(String nib) {
        this.nib = nib;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCARTOESMB != null ? idCARTOESMB.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CartoesMb)) {
            return false;
        }
        CartoesMb other = (CartoesMb) object;
        if ((this.idCARTOESMB == null && other.idCARTOESMB != null) || (this.idCARTOESMB != null && !this.idCARTOESMB.equals(other.idCARTOESMB))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.CartoesMb[idCARTOESMB=" + idCARTOESMB + "]";
    }

}
